<!DOCTYPE html>
<html>
    <head>
        <title><%= title %></title>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <link rel='stylesheet' href='/stylesheets/style.css'/>
        <link rel="stylesheet" href="/lib/foundation/foundation.min.css"/>

        <script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
        <script src="http://cdn.bootcss.com/angular.js/1.6.0/angular.min.js"></script>
        <script src="http://cdn.bootcss.com/angular.js/1.6.0/angular-route.min.js"></script>
        <script src="/lib/foundation/foundation.min.js"></script>
    </head>
    <body>
    <div class="title-bar" data-responsive-toggle="example-menu" data-hide-for="medium">
        <button class="menu-icon" type="button" data-toggle="example-menu"></button>
        <div class="title-bar-title">Menu</div>
    </div>

    <div class="top-bar" id="example-menu">
        <div class="top-bar-left">
            <ul class="dropdown menu" data-dropdown-menu>
                <li class="menu-text">Site Title</li>
                <li>
                    <a href="#">One</a>
                </li>
                <li><a href="#">Two</a></li>
                <li><a href="#">Three</a></li>
            </ul>
        </div>
        <div class="top-bar-right">
            <ul class="menu">
                <li><input type="search" placeholder="Search"></li>
                <li><button type="button" class="button">Search</button></li>
            </ul>
        </div>
    </div>
        <div class="row">
            <div class="large-12 small-12 columns">
                <label>请输入昵称</label>
            </div>
        </div>
        <div class="row">
            <div class="large-10 small-9 columns">
                <input type="text">
            </div>
            <div class="large-2 small-3 columns">
                <a class="expanded button" href="#">确定</a>
            </div>
        </div>
        <div class="row">
            <ul class="dropdown menu" data-dropdown-menu>
                <li>
                    <a href="#">Item 1</a>
                    <ul class="menu">
                        <li><a href="#">Item 1A</a></li>
                    </ul>
                </li>
                <li><a href="#">Item 2</a></li>
                <li><a href="#">Item 3</a></li>
                <li><a href="#">Item 4</a></li>
            </ul>
        </div>
    </body>
    <script src="/socket.io/socket.io.js"></script>
    <script>

        var socket = io.connect('http://localhost:3000');

        socket.on('connected',function(){
            //登录操作
        });

        socket.on('private_message', function (from,msg) {
            //收到消息
        });

        function sendMessage(from,to,msg) {
            socket.emit('private_message',from,to,msg);
        }
    </script>
</html>
